Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@k16shikano
k16shikano / SKILL.md
Last active July 17, 2026 16:28
cognitive-rhythm-writing/SKILL.md
name cognitive-rhythm-writing
description 説明的な文章に緩急を設計するための規範。緩急を装飾ではなく認知モードの切替(観察→逡巡→断定→再観察)と未回収の緊張の管理として扱い、文の拍、段落の密度波形、節の入り方、緩みと駄文の判別、執筆後の機械的な点検手順を定める。読み物として読ませたい章・記事・解説文を生成するとき、または「密度はあるが平坦でおもしろくない」文章を診断・修正するときに使用する。

認知リズムを生むための日本語ライティング規範

密度の高い文章が退屈になるのは、情報が多いからではなく、全文が同じ認知モードで書かれているからである。 この規範は、読者の認知モード(観察する、迷う、確信する、確かめ直す)を意図的に切り替え、常に「続きを読む理由」を維持することで、読み進める推進力を作る。

@sergeliatko
sergeliatko / architecture.schema.md
Created June 24, 2026 16:33
Architecture schema

Architecture Schema

Carrier Files

Schema version 3 uses semantic architecture carrier names:

architecture.yaml
architecture.unit.yaml
architecture.environment.yaml
@13hulk
13hulk / README.md
Last active July 17, 2026 16:27
Zed IDE: Settings

Using Zed IDE for Python? Feel free to use my settings.

Just keep a few things in mind:

  1. Font: I use Fira Code Nerd Font. Make sure it's installed on your system before applying.
  2. AI config: Update the AI model provider and model to match your own setup.
  3. Save behavior: I don't use auto-save — I save manually with Cmd+S. I also have on-save hooks (ruff, isort, black, ty) that may modify your file/buffer unexpectedly. Adjust these if that's not what you want.

Files:

name explain-diff-html
description Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output.

Explain Diff

Please make me a rich, interactive explanation of the specified code change.

It should have these sections:

@samsch
samsch / stop-using-jwts.md
Last active July 17, 2026 16:25
Stop using JWTs

Stop using JWTs!

TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.

If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)

A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/

The reason to avoid JWTs comes down to a couple different points:

  • The JWT specification is specifically designed only for very short-live tokens (~5 minute or less). Sessions
@forkyau
forkyau / hourly_rainfall_data-2026-07-18|00-00.csv
Created July 17, 2026 16:21
GIST created by python code
id station stationid value unit obstime date
0 流浮山 RF001 0 mm 2026-07-18T00:00:00+08:00 2026-07-18
1 湿地公园 RF002 0 mm 2026-07-18T00:00:00+08:00 2026-07-18
2 水边围 N12 0 mm 2026-07-18T00:00:00+08:00 2026-07-18
3 石岗 RF003 0 mm 2026-07-18T00:00:00+08:00 2026-07-18
4 大美督 RF004 0 mm 2026-07-18T00:00:00+08:00 2026-07-18
5 大埔墟 RF005 0 mm 2026-07-18T00:00:00+08:00 2026-07-18
6 北潭涌 RF006 0 mm 2026-07-18T00:00:00+08:00 2026-07-18
7 滘西洲 RF007 0 mm 2026-07-18T00:00:00+08:00 2026-07-18
8 西贡 N15 0 mm 2026-07-18T00:00:00+08:00 2026-07-18
[
{
"where": "Layer",
"if": {
"Datasource.type": "postgis"
},
"then": {
"Datasource.dbname": "hdmht",
"Datasource.user": "skors",
"Datasource.host": "localhost"